# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-pyzbar
pkgver=0.1.9
pkgrel=2
pkgdesc="Read one-dimensional barcodes and QR codes from Python 3"
url="https://github.com/NaturalHistoryMuseum/pyzbar/"
arch="all"
license="MIT"
depends="python3 zbar"
makedepends="python3-dev py3-setuptools"
checkdepends="py3-coveralls py3-nose py3-numpy py3-pillow"
subpackages="$pkgname-pyc"
source="py3-pyzbar-$pkgver.tar.gz::https://github.com/NaturalHistoryMuseum/pyzbar/archive/v$pkgver.tar.gz"
builddir="$srcdir/pyzbar-$pkgver"

case "$CARCH" in
	s390x) options="!check" ;;
esac

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
f9fe774400ed6428bc78a428bd1b7847d5c6d557ea8637125348708f0641b36eceabe69362302c3d8658cf2186ee836c3bfc207fa800a6d03581375c251227e8  py3-pyzbar-0.1.9.tar.gz
"
